
import javafx.scene.media.AudioClip;

import java.io.File;
import java.net.URI;

/**
 * @author lingkang
 * @date 2021/12/11
 */

public class Music {
    public static void playMusic() {

        File file = new File("src\\move.wav");
        URI uri = file.toURI();
        AudioClip audioClip = new AudioClip(uri.toString());
        audioClip.setCycleCount(1);// ���Ŵ���
        audioClip.play();


    }

    public static void main(String[] args) throws Exception {
        playMusic();
    }
}

